package com.libgdxbar.pvzlikegame.entities;

import com.badlogic.gdx.math.Vector2;

// 拥有位置信息的实体
public class LocationEntity extends BaseEntity {
    final Vector2 position;

    public LocationEntity() {
        this(0, 0);
    }

    public LocationEntity(Vector2 position) {
        this(position.x, position.y);
    }

    public LocationEntity(float x, float y) {
        position = new Vector2(x, y);
    }

    @Override
    public void run(float delta) {

    }

    public Vector2 getPosition() {
        return position;
    }

    public void setPosition(Vector2 position) {
        position.set(position);
    }

    public void setPosition(float x, float y) {
        position.set(x, y);
    }

    public void setX(float x) {
        position.x = x;
    }

    public void setY(float y) {
        position.y = y;
    }

    public float getX() {
        return position.x;
    }

    public float getY() {
        return position.y;
    }

}
